//14.3 - Ship.h - Mark Lee - Prima Publishing #ifndef SHIP_H #define SHIP_H //#include "ddraw.h" class Ship // the Ship class - stores the player's ship { RECT position;//position on 3x3 grid (max is (2399,1799)) LPDIRECTDRAWSURFACE7 c_pddsone; //holds the sprite bitmap int speed; //the speed of the ship int direction; //determines which sprite is used //stores the location of sprites on //the bitmap(4 directions = 4 sprites) RECT sprites[4]; public: Ship(); void Move(int direction);//move the ship BOOL isCollision(int, int);//test for a collision void moveBack(); //move in reverse direction RECT GetPosition() {return position;} int GetDirection() {return direction;} void Draw();//draw the entire game screen }; #endif